import json

from db.model import Static
from db.user import User


def getMeta():
    metas = Static.filter(Static.key == 'meta')
    if len(metas) > 0:
        meta = json.loads(metas[0].value)
        # meta['domain'] = meta['domain'].decode('utf8')
        # meta['title'] = meta['title'].decode('utf8')
        # meta['headico'] = meta['headico'].decode('utf8')
        return meta
    else:
        return None
